Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Preview for non site packages #151

Merged
merged 2 commits into from
Jun 23, 2021

Conversation

mficzel
Copy link
Member

@mficzel mficzel commented Jun 10, 2021

The packages configuration can now be used to configure non-site packages for previewing in the styleguide.

When a prototyope of a non-site package is rendered Monocle will only load the Root.fusion of this specific package and the Monocle Root.fusion. Every other fusion including the default fusion has to be included explicitly. This mimics the behavior of the classic FusionView that is used for FusionRendering of Flow Controller Actions.

Sitegeist:
  Monocle:
    packages:
      #add a key to the package list without package specific configuration
      'Vendor.Example': {}

In addition a smarter and configurable way to determine the defaultPackageKey was added.

If a domain can be identified from the current request monocle will use this to determine the initial sitePackage.
If that does not work a newly added setting defaultPackageKey is used. If this setting is not set the key of
the first site package or the first key in the packages configuration is used.

Relates: #109
Resolves: #115

The `packages` configuration can now be used to configure non-site packages for previewing in the styleguide.

When a prototyope of a non-site package is rendered Monocle will only load the Root.fusion of this specific package and the Monocle Root.fusion. Every other fusion including the default fusion has to be included explicitly. This mimics the behavior of the classic FusionView that is used for FusionRendering of Flow Controller Actions.

```YAML
Sitegeist:
  Monocle:
    packages:
      #add a key to the package list without package specific configuration
      'Vendor.Example': {}
```
@mficzel mficzel force-pushed the feature/previewForNonSitePackages branch from c964170 to 692dd53 Compare June 10, 2021 16:18
If a domain can be identified from the request monocle will use this to determine the initial sitePackage.
If that does not work a newly added setting `defaultPackageKey` is used. If this setting was not set the key of
the first site package or the first key in the `packages` configuration is used.
@mficzel mficzel force-pushed the feature/previewForNonSitePackages branch from 02b8a2d to 7954576 Compare June 10, 2021 16:43
@mficzel mficzel requested a review from grebaldi June 10, 2021 16:50
@mficzel mficzel marked this pull request as ready for review June 10, 2021 16:50
@mficzel
Copy link
Member Author

mficzel commented Jun 11, 2021

I just noticed that the Neos dependency should also be removed in favor of a pure fusion dependency. Will add this to this branch soon.

@mficzel mficzel force-pushed the feature/previewForNonSitePackages branch from d75bea0 to 7448b3a Compare June 11, 2021 16:06
@mficzel mficzel force-pushed the feature/previewForNonSitePackages branch from 7448b3a to 7954576 Compare June 23, 2021 15:30
@mficzel mficzel merged commit f03ac3e into master Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to configure default site package key
1 participant